import { R_tableData, R_add, R_update, R_remove } from "@/utils/tableData";


import request from '@/utils/request'

export const A_tableData = function(data) {
    return R_tableData({
        method: 'post',
        url: '/SciUtils/list',
        data,
    })
}


export const A_add = function(data) {
    return R_add({
        method: 'post',
        url: '/SciUtils/add',
        data
    })
}


export const A_update = function(data) {
    return R_update({
        method: 'post',
        url: '/SciUtils/update',
        data
    })
}

/**
 * 
 * @param {*} utilsKey 
 * @returns 
 */
export const A_remove = function(utilsKey) {
    return R_remove({
        method: 'post',
        url: '/SciUtils/delete',
        data: {
            utilsKey
        }
    })
}

/**
 * 获取当前部门
 * @returns 请求的部门
 */
export const A_getUtil = async function() {
    // let result = await request({
    //     method: "post",
    //     url: "/SciDiscipline/showutils",
    // })
    // return result
}

/**
 * 切换部门选择
 * @param {*} command 选择的部门
 * @returns 
 */
export const A_changeUtil = async function(command) {
    // let result = await request({
    //     method: "post",
    //     url: "/SciDiscipline/getutils",
    //     data: {
    //         utilsName: command
    //     }
    // })
    // return result
}